import { defineComponent } from 'vue';
import { ElOption } from 'element-plus';

type optionItem = {
  label: string;
  value: string | number;
};

// type optionsType = optionItem[];

export default defineComponent(
  props => {
    return () => {
      return (
        <>
          {props.options.map((item, index: number) => {
            return <ElOption key={index} label={(item as optionItem).label} value={(item as optionItem).value} />;
          })}
        </>
      );
    };
  },
  {
    props: {
      options: {
        type: Array,
        default: () => []
      }
    }
  }
);
